<template>
	<view>
		<view class="out-border-line-nomargin flex-row column-middle" v-for="(item,index) in memberList" :key="index">
			<image class="avatarUrl-image" :src="item.avatarUrl"></image>
				<!-- <open-data type="userAvatarUrl" class="avatarUrl-image"></open-data> -->
				<text class="fontside-16">{{item.nickName}}</text>
		</view>
		
	</view>
</template>

<script>
	import {getMemberList} from '@/common/api/corporation/corporationMember.js'
	export default {
		data() {
			return {
				memberList: []
			}
		},
		methods: {
			// 获取所有成员的信息
			getMemberList:function(){
				getMemberList(uni.getStorageSync("clubId"),{
					pageNum: 1,
					pageSize: 10
				}).then(res => {
					if(res.data.code == 200) {
						if(res.data.data.list != null) {
							// 只需要头像和名字,名字暂时是拿昵称
							this.memberList = res.data.data.list
						}
					} else {
						uni.showToast({
							title: "网络错误",
							icon: 'none'
						})
					}
				})
			},
		},
		onLoad() {
			this.getMemberList()
		}
	}
</script>

<style>
.avatarUrl-image{
	width: 35px;
	height: 35px;
	border-radius: 50%;
	overflow: hidden;
	margin: 20rpx 5%;
}
</style>
